package org.exhaust.barbecue.action;

import org.exhaust.barbecue.AbstractRequest;
import org.exhaust.barbecue.AbstractResponse;
import org.exhaust.barbecue.Action;
import org.exhaust.barbecue.ActionContext;

public abstract class AbstractPrepareAction<M extends AbstractRequest, N extends AbstractResponse> implements Action<M, N> {
    @Override
    public boolean perform(AbstractRequest request, AbstractResponse response, ActionContext context) {
        prepare((M) request, context);
        return true;
    }

    protected abstract void prepare(M request, ActionContext context);
}
